2. Field of the Invention
The present invention relates to a data selection device and, in particular, to a data selection device which selects a plurality of data, as candidate data, at high speed after performing a discrimination arithmetic-operation in a character recognition device or the like.
2 Description of the Related Art
In the prior art, the following methods of sorting for selecting candidate data after an arithmetic operation in a device equipped with a data selection device, namely, a character recognition device, are known.
A memory space having an address width corresponding to the range of all input data is prepared, and using a calculated result as an address, is accessed. An identifier for the computed result, for example, a JIS code in the case of a character, is stored in the accessed address. At the termination of all arithmetic operations, identifiers are output starting with a smaller address when in ascending order and starting with a greater address when in descending order.
At this point, as an example of selecting candidate data, the configuration of the discrimination section of a conventional character recognition device is shown in FIG. 3A. In a dictionary 200, data is stored which is referred to with respect to input data 201 and identifiers composed of JIS codes. When the input data 201 is input, dictionary 200 is accessed and data 202 and JIS codes 203 are output. Data 201 and 202 are input to an address bus 207 after they are calculated in a computing unit 204, and the JIS code 203 is input to a data bus 208. Then, a memory 206 is accessed and the JIS code 203 is written using the result of the computation obtained by the computing unit 204 as an address. The configuration of the memory at this time is shown in FIG. 3B and the JIS code is entered in the data portion.
However, according to the above-mentioned conventional example, where the discriminated and computed result is output as the same numeric data more than once, the older entry is overwritten, i.e., former identifier is erased. On the other hand, if it is arranged that when the result is written once, it will not be overwritten, then data to be written subsequently will be lost. Where data is written once, even if the adjacent address is accessed and data is written, the construction becomes complex and the result of the arithmetic operation will not have a one-to-one correspondence. Also, the entire address space of the memory must be accessed. That is, since accessing a portion where data is not written is required, much of the accesses will become meaningless. It is required that the range of data of the result of an arithmetic operation must be known beforehand, and an address space corresponding to that range must be provided, with the result that quite a large RAM will be needed. Of course, problems of high speed and increased cost for that purpose or increased size of tape, when tapes are used, will arise.
Where data is read out in ascending or descending order as a list of data, the need to control the decrement or increment of an address will arise. Further, only identifiers can be read out and reading out data in the identifier (corresponding to an address in this case) cannot be performed. Particularly, a reject operation may sometimes be performed on the basis of the above-mentioned result of the computation in an application with the character recognition mentioned above. However, it cannot be used in such case.